import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useCountStore = defineStore('counter', () => {
  const count = ref(100)

  const add = (num) => {
    count.value += num
  }

  const sub = (num) => {
    count.value -= num
  }

  return {
    count,
    add,
    sub
  }
})
